<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Thymeleaf Example</title>
</head>
<body>
<h1 th:text="${message}">Welcome to Spring Boot with Thymeleaf!</h1>
if条件判断
<p th:if="${user != null}">Hello, <span th:text="${user.name}">User</span></p>
for循环
<ul>
    <li th:each="item : ${items}" th:text="${item.name}">Item name</li>
</ul>

表单机制
<form th:action="@{/submit}" th:object="${user}" method="post">
    <label for="name">Name:</label>
    <input type="text" th:field="*{name}" id="name"/>

    <label for="email">Email:</label>
    <input type="email" th:field="*{email}" id="email"/>

    <label for="age">age:</label>
    <input type="text" th:field="*{age}" id="age"/>

    <button type="submit">Submit</button>
</form>

</body>
</html>
